Anti-modularization for both high robustness and efficiency including the optimal case

Although robustness of connectivity and modular structures in networks have been attracted much attentions in complex networks, most researches have focused on those two features in Erdos-Renyi random graphs and Scale-Free networks whose degree distributions follow Poisson and power-law, respectively. This paper investigates the effect of modularity on robustness in a modular d-regular graphs. Our results reveal that high modularity reduces the robustness even from the optimal robustness of a random d-regular graph in the pure effect of degree distributions. Moreover, we find that a low modular d-regular graph exhibits small-world property that average path length is O(logN). These results indicate that low modularity on modular structures leads to coexistence of both high robustness and efficiency of paths.


Introduction
Energy, transportation, and communication systems provide essential services for supporting human activity and society.However, in these network systems, there is a common topological structure called Scale-Free (SF), which has the extreme vulnerability against malicious attacks to hubs [1].Therefore, constructing more robust networks is one of the important issues in complex networks.Recently, it has been revealed that enhancing loops is crucial for constructing a robust network in supporting from the asymptotical equivalence of network dismantling and decycling problems when the second moment of degree is not divergent [2].Here, the dismantling problem is to find the minimum set of nodes which removal makes a network fragmented into at most a given size, while the decycling problem is to find the minimum set of nodes which are necessary to form loops.When all loops are removed from a network, the network becomes a tree which is easily fragmented by any articular-node removals.Thus, enhancing loops is important to make a network hard to become a tree.Actually, several rewiring methods [3] based on enhancing loops generate robust networks with a common phenomena of decreasing the gap between the maximum and minimum degrees.In other words, the network is more robust as the gap becomes smaller.In the extreme case, it is suggested that a random d-regular graph with zero gap has the optimal robustness in the pure effect of degree distributions [4,5].Regular graphs have been so far studied mainly for not robustness but spectral analysis [6] or graph theory, while there are huge researches [7,8] for robustness in Erdos-renyi (ER) random graphs and SF networks.Therefore, regular graphs become a blind spot in investigating the robustness of connectivity.
On the other hand, a modular structure is also an important issue in complex networks, because many real-world networks have modular structures.For example, in social networks, modules are corresponding to communities or groups with shared interests or backgrounds.If a network has high modularity, nodes in a same module are densely connected to each other, whereas nodes in different modules are sparsely connected.
Recently, it has been shown that [9,10] ER random graphs and SF networks with modular structures become weaker against attacks than them without modular structures.Here, the modularity of networks is controlled by rewiring links.Moreover, Module-Based (MB) attacks which are targeting interconnected nodes with high betweenness centrality are highly destructive to modular networks [11].Thus, we predict that random d-regular graphs with modules become vulnerable against MB attacks, even the original graphs have the optimal robustness [4,5].The modularity of the modular network is controlled by rewiring inspired from [9,10] with preserving degree distributions.In addition, we show that d-regular graphs with low modularity have both high robustness of connectivity and efficiency of paths.
This paper is organized as follows.First, we introduce a modular network of d-regular graphs and an anti-modularization that is rewiring links to decrease the modularity.Second, we show that rewired networks on anti-modularization have high robustness of connectivity and efficiency of paths.Third, we modify the conventional modularization [10] to maintain dregular graphs and show that modified modularization has the same results with our antimodularization.Finally, we summarize the obtained results.by the minimum number of inter-module links (inter-links) and the maximum number of intra-module links (intra-links).However, this network is extremely vulnerable by removing target nodes which are connecting between modules.As a special case, when each module is set as a clique, such network is called caveman graph [12].For a caveman graph, small-world (SW) property with the average path length of O(logN) emerges by rewiring from a few intralinks to inter-links.We discuss not only the robustness but also the efficiency with SW property in modular networks of d-regular graphs.

Control of modularity
To control the modularity of network, intra-links are rewired to inter-links on anti-modularization as shown in Fig 1B.This is regarded as the inverse process of the conventional modularization [10], although it tends to not make a ring as mentioned later.Table 1 shows the initial number of intra-and inter-links.By rewirings, the number of intra-links is only decreasing on anti-modularization, because the sum of intra-and inter-links is constant M. In contrast, the number of inter-links is only decreasing on modularization [10].With a rewiring rate w 0 , intra-links are randomly rewired to inter-links on anti-modularization as shown in Fig 1(B), while with a rewiring rate w, inter-links are randomly rewired to intra-links on modularization [10].Moreover, the relation of w 0 and w is derived from the following equation whose left-and right-hand sides are the existing number of inter-links on anti-modularization and the remaining number of them on modularization [10] after both rewirings.Then, we have The detail process of anti-modularization is summarized as follows.Through the process, the degree distributions and whole connectivity of rewired networks are maintained, while they are not on the conventional modularization [10].We will compare such differences in the next section.
Step 1 At first, remove an intra-link randomly in a module.Then, randomly select one endnode of the removed link.
Step 2 Remove another intra-link randomly in a different module from that in Step1.Then, randomly select one end-node from the removed link.
Step 3 Create a new inter-link between two selected nodes by rewiring.
Step 4 Remove another intra-link randomly in a different module from that in Step 2 or the previous Step 4.Then, randomly select one end-node from the removed link.
Step 5 To preserve the degree at a node, the unselected end-node in Step 2 or the previous Step 4 is selected again.Create a new inter-link between two selected nodes by rewiring.
Step 6 Steps 4 and 5 are repeated until w 0 (M − m o ) inter-links are created for a given 0 < w 0 < 1.If connected components or nodes are isolated by rewiring, select other end-node or intra-link again.At the end of repeated process, the last inter-link is connected to the node which is unselected in Step 1.
To investigate the robustness of connectivity, the following three types of attacks RF, IB, and MB are considered.In RF (Random Failures), nodes are randomly selected for removal.In IB (Initial Betweenness) attacks, nodes are selected in decreasing order of betweenness centrality.In MB (Module-Based) attacks [11], nodes are basically selected in decreasing order of betweenness centrality, however the nodes belong to the Largest Connected Component (LCC) and end-nodes of inter-links have the order of priority.MB and IB attacks are highly distructive especially for modular networks [11], while RF gives well-known typical damages and is considered to compare the robustness with them.

Coexistance of robustness and efficiency
We investigate the robustness of connectivity and efficiency of paths in rewired networks on anti-modularization.In addition, we compare the robustness in rewired networks on both anti-modularization and modified modularization to maintain degree distribution, and show that the results for both modularization are almost coincidence.Here, the degree and the size of modular network are d = 4, 9, 19 and N = 10 4 .Since N is constant, the size of each module N m is also constant for a given number m o of modules which is a control parameter.When m o is maximum, the module becomes a clique K d+1 in a caveman graph [12].Modularity Q and following eight measures are investigated and are averaged over 100 realizations for the networks in varying a rewiring rate w 0 .

• Modularity
, where A is adjacency matrix, k i is degree of node i, and δ i,j is 1 if nodes i and j belong to a same module or 0 otherwirse.
• Ratio S 1st (q)/N of the 1st LCC size, where S 1st (q) denotes the number of nodes in the 1st LCC after attacks to qN nodes.0 < q � 1 is a fraction of attacks.
• Robustness N after attacks to qN nodes.The summation means q ¼ 1 N ; 2 N ; ::: NÀ 1 N , and N N ¼ 1: Except for R, there are other following measures of robustness [15] in the viewpoints of shortest paths and graph spectrum.

Reciprocal of network efficiency
, where d ij denotes the shortest path length between nodes i and j.H is called harmonic mean.

Increasing robustness by anti-modularization
Mainly Table 2 shows a critical fraction q c denoted by q MB c , q IB c , and q RF c at the maximum size of the 2nd LCC against MB, IB attacks and RF in rewired networks with d = 9 and m o = 200.Since the 1st LCC is fragmented at the critical fraction q c , the whole connectivity is broken considerably.Values of q MB c , q IB c , and q RF c increase as larger w 0 .Especially, q MB c , q IB c are rapidly increasing between the case of w 0 = 0.1 and w 0 = 0.3.When w 0 � 0.3, q RF c is higher than q MB c and q IB c .However, when w 0 � 0.5, q RF c becomes lower than q MB c and q IB c .In particular, for w 0 = 0.9, q IB c is approaching 0.875, which is the percolation threshold 1 − 1/(d − 1) = 1 − 0.125 for d = 9 in random d-regular graphs [4].From Table 2, we find that random d-regular graphs with low modularity (w 0 � 0.5) have stronger robustness with high q c against selected IB attacks than that against unintended RF.This phenomena is unusual in ER random graphs or SF networks [16].As a considerable reason, IB attacks remove only the core part which is frequently passed by the shortest paths, while the remaining nodes maintain the connectivity on the peripheral in d-regular graphs.
We note that the rewired networks for high w 0 on anti-modularization have low modularity.curves.However, these behaviors are not observed in in Fig 3C .The reasons for such behaviors are unknown in the current stage, and will be investigated in future works.We should remark that R MB , R IB and R RF in rewired networks with high Q become lower than those in non-modular ER networks (black line) and SF networks known as the extremely vulnerable structure (black dotted line).This means that modular random d-regular graphs become more vulnerable than SF networks by increasing the modularity, even if non-modular random d-regular graphs have the optimal robustness against malicious attacks [4,5].Note that robustness against IB and Initial Degree (ID) attacks also decrease as increasing the modualarity Q in SF networks and real-world networks [10].
As shown in Fig 4A -4F, we investigate other measures of robustness: average betweenness centrality, the reciprocal of network efficiency, average path length, diameter, spectral gap, and algebraic connectivity.Consequently, when modularity Q increase, the values of average betweenness centrality, the reciprocal of network efficiency, average path length, and diameter also increase (Fig 4A -4D), while the values of spectral gap and algebraic connectivity decrease (Fig 4E and 4F).These results indicate that networks with low modularity have good robustness.Similar results are obtained for other networks with varying d as shown in S9 and S10 Figs.

Emerging SW property by anti-modularization
Moreover, we have investigated efficiency of paths in two ways.First, as similar to the result of SW property for a caveman graph [12], we show that SW property emerges in regular graphs.Then, we compare the numerical values of average path length with newly proposed estimation [17].In general for a sparse network with any degree distribution, the average path length is derived through the analysis of generating functions [18].From hki = d and hk 2 i = d 2 for a is obtained approximately as SW property.Thus, we compare Eq (2) with our results for the modular networks after rewirings.Fig 6 shows that the color lines of O(logN) with slightly different slops approach black solid line for random d-regular graphs.In particular, purple line for the case with w 0 = 0.9 almost coincides with black solid line, while there is a small gap between black solid and dashed lines.Note that dashed line corresponds to Eq (2).However, it has been pointed out that there exist disparities between numerically obtained average path length and more rigorous estimation than Eq (2) for random regular graphs, when they are dense [17].Our study for d = 4, 9 and 19 � N is classified as sparse graphs, the derivation of more rigorous estimation is intractable for the modular networks.Therefore, it will be a future work to investigate the existing such disparities.

Comparing with modified modularization as the inverse process of antimodularization
Since the conventional modularization [10] does not maintain a degree distribution and whole connectivity, we propose modified process of it.Fig 7A -7C show that the degree distributions have widths in rewired networks with d = 9 and m o = 100 on the conventional modularization [10].We confirm that degree distributions also have widths in rewired networks for varying d and m o .This means that rewired networks are no longer random d-regular graphs on the conventional modularization [10].Thus, we modify the process of modularization [10] to maintain connected d-regular graphs.The basic idea is similar to our anti-modularization.

Conclusion
We have numerically investigated the robustness of connectivity in modular d-regular graphs which have the optimal tolerance in the non-modular random case.The robustness against MB, IB attacks and RF increases, when more intra-links are rewiring on anti-modularization.In particular, our results have shown that the robustness decreases rapidly against MB attacks than IB attacks as the modularity increases.When the modularity Q is above 0.8, the robustness of modular d-regular graphs becomes lower than the robustness of very fragile SF networks.Moreover, we have shown that both high robustness and efficiency coexist in rewired networks on anti-modularization.In fact, like caveman graphs [12], modular d-regular graphs exhibit SW property by rewiring only a few intra-links for w 0 = 0.1, whereas the numerical values of L for modular networks are slightly different from the well-known theoretical values [18] for random regular graphs.At w 0 = 0.1, modular d-regular graphs still have low robustness.Thus, in order to be both high robust and efficient, more intra-links at least with 0.1 < w 0 < 0.3 are needed in modular d-regular graphs.
Unlike our results for regular graphs with N = 10 4 , the previous study [9] shows that there exists a critical number m * o of modules below which ER random graphs are completely broken into modules by attacks on interconnected nodes.In particular, for ER random graphs with N = 6 × 10 5 , discontinuous jump of the 1st LCC size occurs for a critical number m* of modules.Although the study [9] also considers a modular network that consist of m o modules, it additionally defines the ratio α between the probabilities for an intra-and inter-links.With constant average degree hki and ratio α, the percolation threshold is shown as a function of m o 1À w À ðm o À 1Þ [10].Hence there exists such differences, it is unknown whether or not the discontinuous jump also appears in our case for very larger N. Thus, it is required to compare the results in this point.
On the other hand, we find that modular d-regular graphs with low modularity are more robust against selected IB attacks than against unintended RF.We also confirm that the robustness of rewired networks on modified modularization is almost identical to that on the anti-modularization which is the inverse process of the modified one.However, there still remains some unclear reasons for our results.For example, as shown in S4A Fig, curves of R IB with w 0 = 0.01 and 0.1 have inverse relationship.In addition, in Fig 2F , S3F and S6F Figs, some curves of the 1st LCC size with w 0 = 0.9 and w 0 = 0.1 are crossing at high attack rates q ' 0.85, 0.7, and 0.92 of node removals.Thus, further investigations are necessary for such phenomena.
Although huge computation times are required, it will be future works to investigate the robustness of connectivity against various attacks: edge attacks [19], attacks based on other node centrality [20], CoreHD [21], collective influence [22], belief propagation [23], or spatial localized attacks [24].Moreover, expanding our analytical framework may be meaningful as another direction.For example, since our work mainly deals with malicious attack, it can be considered to investigate an effect of cascading failures [25].Link addition on modular networks for studying robustness [26] could be considered because SW property emerge by not only random rewiring but also link addition [27]. We

Fig 1 .
Fig 1. Configuration of a modular network before/after rewirings.(A) Initial configuration of strongly modular network.(B) Rewired modular network to increase the robustness of connectivity.Node colors indicate modules.https://doi.org/10.1371/journal.pone.0301269.g001 , we explain the results for d = 9.See figures from S3 to S8 Figs as similar results obtained for d = 4 and d = 19.We investigate the ratio S 1st (q)/N of the 1st LCC size against MB attacks in rewired networks on anti-modularization.Fig 2A-2F are corresponding to 9-regular graphs with m o = 1000, 500, 100, 50, 20, and 5, respectively.As shown in Fig 2A, the curve for w 0 = 0 (gray line) decreases very rapidly because of initial ring structure.However, as the rewiring rate w 0 increases on anti-modularization, the curves are shifting to right.At w 0 = 0.9, the curve is approaching purple lines for non-modular random d-regular graphs.Such curve-shifting are also observed in the results for different size of modules m o = 500, 100, 50, 20, and 5 in each of Fig 2B-2F.In comparing with same color lines in Fig 2A-2E, curves are more shifting to right as smaller m o .On the other hand, in Fig 2A-2F, curves for w 0 � 0.5 (blue and purple lines) are almost identical.Moreover, as shown in Fig 2F, for w 0 = 0 and 0.1 (gray and red lines), the curves rapidly decrease to S 1st (q)/N � N m /N = 2000/10000 = 0.2 at first.Then, the curves gradually decrease from around 0.2.Note that MB attacks destroy a network in two steps.First, MB attacks are targeting the end-nodes of inter-links, and divide into several isolated modules.Next, each of isolated modules is collapsed gradually.See S1 and S2 Figs in cases of IB attacks and RF.
Fig 3 shows that robustness index R against each of three types of attacks is monotonically decreasing function of modularity Q even for varying m o shown by color lines.In Fig 3A and 3B, when Q < 0.2, all colored curves are approaching cyan lines, which indicates the robustness index R IB against IB attacks for non-modular random 9-regular graphs.All colored curves in Fig 3C are also approaching cyan lines when Q < 0.5.In addition, there are two behaviors among curves in Fig 3A and 3B.One is that, from m o = 1000 to m o = 50, red curves are shifting to green curves.The other is that, from m o = 50 to m o = 5, green curves are shifting to purple

Fig 3 .
Fig 3. Relation between modularity Q and robustness index R against three types of attacks.(A) R MB against MB, (B) R IB against IB, and (C) R RF against RF.Color lines represent the results for the number m o of modules.Black solid, dotted, and cyan lines represent the robustness after these attacks in non-modular ER, SF networks and random d-regular graphs.https://doi.org/10.1371/journal.pone.0301269.g003

Fig 4 .
Fig 4. Relation between modularity Q and six measures of robustness in rewired networks with d = 9. (A) Average betweenness centrality, (B) reciprocal of network efficiency, (C) average path length, (D) diameter, (E) spectral gap, (F) algebraic connectivity.Color lines represent the results for the numbers m o of modules.https://doi.org/10.1371/journal.pone.0301269.g004 Fig 5A shows the average path length L as function of network size N, when d = 4 and N m = 10 are fixed.In a ring structure (when w 0 = 0), L is O(N) (black line).However, even only rewiring a few intra-links, L becomes O(logN) for w 0 = 0.1 (yellow line).This indicates that a network has SW property [12].Similar results are obtained for other networks in Fig 5B with d = 9, N m = 20 and in Fig 5C with d = 19, N m = 50.It is common that L is O(logN) in these networks for w 0 = 0.1.In addition, figures from S11 to S13 Figs show that SW property emerges in rewired networks even for varying d and N m .Remember the result in caveman graphs [12], which consist of cliques initially connected as a ring.Our obtained results include the robustness for the caveman graphs in Fig 2A, because cliques are the most densely case of regular graphs.

Fig 6 .
Fig 6.Disparities of average path length L between the values for rewired modular networks and theoretical value.Rewired networks with (A) d = 4, N m = 20, (B) d = 9, N m = 20, and (C) d = 19, N m = 20.Color lines represent a rewiring rate w 0 on anti-modularization.Black solid and dashed lines indicate numerical and theoretical values for random d-regular graphs without modular structures.https://doi.org/10.1371/journal.pone.0301269.g006 Fig 8 illustrates the modified process.Initially, module numbers 1, 2, . .., m o are assigned to nodes randomly, while a size of each module N m is constant.(1) An inter-link (i, j) is randomly removed.Then, one end-node j of the removed link is selected randomly.(2) A node k is randomly selected, which belongs to a same module with node j and does not connected to node j.Then, a new intra-link is created between nodes j and k. (3) To preserve a node degree, an inter-link (k, l) is randomly removed.(4) Select node m in a same module with node l randomly.Then, create a new intra-link between nodes l and m. (5) An inter-link (m, n) is randomly removed.After (5), node n is the next target for rewiring.Such process is repeated until w(M − M/m o ) intra-links are created without isolation of connected components and nodes.However, at the end of repeated process, the degree of first selected node i is decreased by one at (1), while the degree of last selected p is increased by one.As shown in Fig 9A for the robustness, curves of each colors on modified modularization (dotted lines) and anti-modularization (solid lines) are almost identical in rewired networks with m o = 100.However, as smaller number m o of modules, the gaps between solid and dotted

Fig 8 .
Fig 8. Process of the modified modularization.The numbers in brackets denote a sequence of the process.Yellow circles represent modules.Black dotted and Blue solid lines are inter-and intra-links by rewirings, respectively.https://doi.org/10.1371/journal.pone.0301269.g008

Fig 9 .
Fig 9. Comparing the robustness against MB attacks in rewired networks on the anti-modularization and modified modularization.The 1st LCC size against MB attacks in rewired networks with d = 9 and number m o of modules.(A) m o = 100, (B) m o = 20, and (C) m o = 5.Solid and dotted color lines represent the results by rewiring with w 0 on anti-modularization and w on modified modularization.https://doi.org/10.1371/journal.pone.0301269.g009 obtain similar results for different attacks or values of d and m o as follows.Figures from S1 to S8 Figs show the 1st LCC size against MB, IB attacks and RF in rewired networks with d = 4, 9 and 19.The 1st LCC size against MB attacks with d = 9 is already shown in Fig 2. S11-S13 Figs show the average path length in rewired networks with d = 4, 9 and 19 for varying N m from 5, 10, and 20 as cliques to 100.Thus, for each N m , the network size N = N m × m o is changed by m o , while the minimum value of m o is 3. S14 Fig show disparities of L between the values for rewired modular networks with N m = 100 and theoretical value.S15 and S16 Figs show the 1st LCC size against IB attacks and RF to compare the results on anti-modularization and modified modularization.Note that the number m o of modules becomes the maximum when it is equal to the size of clique K 5 , K 10 or K 20 .Since network size N is 10 4 , the maximum values of m o are 2000, 1000, and 500 for each of module sizes N m = 5, 10 and 20.

Table 1 . Initial numbers of intra-and inter-links.
https://doi.org/10.1371/journal.pone.0301269.t001 L ¼1, where d ij denotes the shortest path length between nodes i and j.L is called arithmetic mean.4. Diameter D = max{d ij }, where d ij is the shortest path length between node i and j.Small values of H, L and D mean that a network is robust.ij , where n ij (k) is the number of shortest paths between node i and j through node k.A small value of b indicates that lots of nodes are connected by the shortest path without relying on specific nodes like hubs.6. Spectral gap λ d = λ 1 − λ 2 , which is the difference between the largest and second largest eigenvalues λ 1 and λ 2 of the adjacency matrix of a network.Since a small value of λ d is related to network bottlenecks and bridges, a larger value of λ d indicates better robustness.7. Algebraic connectivity μ 2 , which is the second smallest eigenvalue of the Laplacian matrix of a network.A larger value of μ 2 means more rapid diffusion.
ij n